#!/usr/bin/perl

=head1 NAME

curl-depends - calculates curl dependencies

=head1 DESCRIPTION

curl-depends is a debhelper-like program that is responsible for generating the
${libcurl-dev:Depends} substitutions and adding them to substvars files.

=cut

use strict;
use warnings;
use Debian::Debhelper::Dh_Lib;

=head1 SYNOPSIS

B<curl-depends> [S<I<debhelper options>>]

=cut

init ();

# The current libcurl-dev package
my $libcurl_dev = qx(grep-status -r -P libcurl.-dev --and -r -F Status ^install -s Package -n);

foreach my $package (@{$dh{DOPACKAGES}}) {
  delsubstvar($package, "libcurl-dev:Depends");
  addsubstvar($package, "libcurl-dev:Depends", "$libcurl_dev");
}

=head1 SEE ALSO

L<debhelper(7)>

This program is not part of debhelper.

=head1 AUTHOR

Torsten Werner <twerner@debian.org>

Most ideas borrowed from octave-depends by Rafael Laboissiere
<rafael@debian.org>.

=cut
